<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta http-equiv='content-type' content='text/html; charset=UTF-8' />
	<title>TravelDream</title>
	<link href='../css/application.css' media='all' rel='stylesheet'
		type='text/css' />
	<script type='text/javascript' src='../css/menu.js' />


</h:head>
<h:body onload="javascript:start()">
	<div id="boxintestazione">
		<div id="boxlogo">
			<h:link outcome="/index">
				<img src="../css/v1sinistra.png" />
			</h:link>
		</div>
		<h:form id="boxlandmarktop">
			<div id="boxlandmarktop">

				<h:commandLink action="#{gp.logout}" value="LOGOUT"
					id="textlandmark_left2" rendered="#{gp.loggato()}" />

				<h:link outcome="/user/index" value="Ciao, #{gp.nomeUtente}"
					id="textlandmark_right2" rendered="#{gp.loggato()}" />
			</div>
		</h:form>
	</div>
	<!--/intestazione-->
	<div id="boxlinea1"></div>
	<div id="boxlinea2"></div>
	<div id="boxlinea3"></div>
	<div id="boxlinea4"></div>
	<div id="boxlinea5"></div>
	<div id="boxbig">
		<div id="boxmenu">
			<div id="boxPacchetti">
				<a href="javaScript:menuFunc('boxleft1')">Viaggi</a>
				<ul id="boxleft1">
					<li><h:link outcome="/cittaPacchetti" value="Per Destinazione"
							id="p1"></h:link></li>
					<li><h:link outcome="/prezziPacchetti"
							value="Per tutte le tasche" id="p2"></h:link></li>
					<li><h:link outcome="/tipologiePacchetti"
							value="Quello che fa per te" id="p3"></h:link></li>
				</ul>
			</div>
			<div id="boxHotel">
				<a href="javaScript:menuFunc('boxleft2')">Hotel</a>
				<ul id="boxleft2">
					<li><h:link outcome="/cittaHotel" value="Città"></h:link></li>
					<li><h:link outcome="/prezziHotel" value="Per tutte le tasche"></h:link></li>
				</ul>
			</div>
			<div id="boxLandmark">
				<ul id="boxleft3">
					<li><h:link outcome="/chiSiamo" value="Chi siamo"></h:link></li>
					<li><h:link outcome="/contatti" value="Contatti" id="ultimo"></h:link></li>
				</ul>
			</div>
		</div>
		<div id="boxcontenuto">
			<div>
				<h1>Crea un nuovo pacchetto</h1>
				<h:form>
					<h:panelGrid columns="3" id="regGrid1"
						rendered="#{go.primaPaginaVisibile()}">
						<h:outputLabel for="titolo">Titolo</h:outputLabel>
						<h:inputText id="titolo" value="#{go.titolo}" />
						<p:message for="titolo" />

						<h:outputLabel for="descrizione">Descrizione</h:outputLabel>
						<h:inputTextarea id="descrizione" value="#{go.descrizione}"
							cols="50" rows="20" />
						<p:message for="descrizione" />

						<h:outputLabel for="citta">Città del pacchetto</h:outputLabel>
						<h:selectOneMenu value="#{go.citta}" id="citta">
							<f:selectItems value="#{ds.citta}" var="c" itemLabel="#{c}"
								itemValue="#{c}" />
						</h:selectOneMenu>
						<p:message for="citta" />

						<h:outputLabel for="cittaPartenza">Città partenza</h:outputLabel>
						<h:selectOneMenu value="#{go.cittaPartenza}" id="cittaPartenza">
							<f:selectItems value="#{ds.citta}" var="c" itemLabel="#{c}"
								itemValue="#{c}" />
						</h:selectOneMenu>
						<p:message for="cittaPartenza" />

						<h:outputLabel for="dataAndata">Data andata</h:outputLabel>
						<p:calendar value="#{go.dataAndata}" id="dataAndata" />
						<p:message for="dataAndata" />

						<h:outputLabel for="dataRitorno">Data ritorno</h:outputLabel>
						<p:calendar value="#{go.dataRitorno}" id="dataRitorno" />
						<p:message for="dataRitorno" />

						<h:outputLabel for="target">Target</h:outputLabel>
						<h:selectOneMenu value="#{go.target}" id="target">
							<f:selectItem itemLabel="singolo" itemValue="singolo" />
							<f:selectItem itemLabel="coppia" itemValue="coppia" />
							<f:selectItem itemLabel="gruppo" itemValue="gruppo" />
						</h:selectOneMenu>
						<p:message for="target" />

						<h:outputLabel for="tipologia">Tipologia</h:outputLabel>
						<h:selectOneMenu value="#{go.tipologia}" id="tipologia">
							<f:selectItem itemLabel="culturale" itemValue="culturale" />
							<f:selectItem itemLabel="romantico" itemValue="romantico" />
							<f:selectItem itemLabel="relax" itemValue="relax" />
							<f:selectItem itemLabel="avventura" itemValue="avventura" />
						</h:selectOneMenu>
						<p:message for="tipologia" />

						<h:commandButton value="Continua" action="#{go.continuaCreazione()}"
							rendered="true" />
					</h:panelGrid>


					<h:panelGrid columns="3" id="regGrid2"
						rendered="#{go.secondaPaginaVisibile()}">
						<h:outputLabel for="voloAndata">Volo andata</h:outputLabel>
						<h:selectOneMenu value="#{go.pDTO.voloAndata}" id="voloAndata">
							<f:selectItems value="#{go.voliPossibiliAndata()}" var="c"
								itemLabel="#{c.dataFormattata}" itemValue="#{c.idVolo}" />
						</h:selectOneMenu>
						<p:message for="voloAndata" />

						<h:outputLabel for="voloRitorno">Volo ritorno</h:outputLabel>
						<h:selectOneMenu value="#{go.pDTO.voloRitorno}" id="voloRitorno">
							<f:selectItems value="#{go.voliPossibiliRitorno()}" var="c"
								itemLabel="#{c.dataFormattata}" itemValue="#{c.idVolo}" />
						</h:selectOneMenu>
						<p:message for="voloRitorno" />

						<h:outputLabel for="pernottamento">Pernottamento</h:outputLabel>
						<h:selectOneMenu value="#{go.pDTO.idPernottamento}"
							id="pernottamento">
							<f:selectItems value="#{go.pernottamentiPossibili()}" var="c"
								itemLabel="#{c.tipo} - #{ds.getHotelPerId(c.idHotel).nome}, #{ds.getHotelPerId(c.idHotel).indirizzo}"
								itemValue="#{c.idPernottamento}" />
						</h:selectOneMenu>
						<p:message for="pernottamento" />


						<h:outputLabel for="attivita1">Attivita1</h:outputLabel>
						<h:selectOneMenu value="#{go.attivita1.id}" id="attivita1">
							<f:selectItem itemLabel="NESSUNA" itemValue="0" />
							<f:selectItems value="#{go.attivitaPossibili}" var="c1"
								itemLabel="#{c1.titolo}, #{c1.dataFormattata} #{c1.oraFormattata} - #{c1.prezzo} euro"
								itemValue="#{c1.id}" />
						</h:selectOneMenu>
						<p:message for="attivita1" />


						<h:outputLabel for="attivita2">Attivita2</h:outputLabel>
						<h:selectOneMenu value="#{go.attivita2.id}" id="attivita2">
							<f:selectItem itemLabel="NESSUNA" itemValue="0" />
							<f:selectItems value="#{go.attivitaPossibili}" var="c2"
								itemLabel="#{c2.titolo}, #{c2.dataFormattata} #{c2.oraFormattata} - #{c2.prezzo} euro"
								itemValue="#{c2.id}" />
						</h:selectOneMenu>
						<p:message for="attivita2" />

						<h:outputLabel for="attivita3">Attivita3</h:outputLabel>
						<h:selectOneMenu value="#{go.attivita3.id}" id="attivita3">
							<f:selectItem itemLabel="NESSUNA" itemValue="0" />
							<f:selectItems value="#{go.attivitaPossibili}" var="c3"
								itemLabel="#{c3.titolo}, #{c3.dataFormattata} #{c3.oraFormattata} - #{c3.prezzo} euro"
								itemValue="#{c3.id}" />
						</h:selectOneMenu>
						<p:message for="attivita3" />

						<h:outputLabel for="attivita4">Attivita4</h:outputLabel>
						<h:selectOneMenu value="#{go.attivita4.id}" id="attivita4">
							<f:selectItem itemLabel="NESSUNA" itemValue="0" />
							<f:selectItems value="#{go.attivitaPossibili}" var="c4"
								itemLabel="#{c4.titolo}, #{c4.dataFormattata} #{c4.oraFormattata} - #{c4.prezzo} euro"
								itemValue="#{c4.id}" />
						</h:selectOneMenu>
						<p:message for="attivita4" />

						<h:outputLabel for="attivita5">Attivita5</h:outputLabel>
						<h:selectOneMenu value="#{go.attivita5.id}" id="attivita5">
							<f:selectItem itemLabel="NESSUNA" itemValue="0" />
							<f:selectItems value="#{go.attivitaPossibili}" var="c5"
								itemLabel="#{c5.titolo}, #{c5.dataFormattata} #{c5.oraFormattata} - #{c5.prezzo} euro"
								itemValue="#{c5.id}" />
						</h:selectOneMenu>
						<p:message for="attivita5" />

						<h:outputLabel for="prezzo">Prezzo</h:outputLabel>
						<h:inputText id="prezzo" value="#{go.pDTO.prezzoString}" />
						<p:message for="prezzo" />

						<h:outputLabel for="foto1">Foto1</h:outputLabel>
						<h:inputText id="foto1" value="#{go.pDTO.foto1}" />
						<p:message for="foto1" />

						<h:outputLabel for="foto2">Foto2</h:outputLabel>
						<h:inputText id="foto2" value="#{go.pDTO.foto2}" />
						<p:message for="foto2" />

						<h:outputLabel for="foto3">Foto3</h:outputLabel>
						<h:inputText id="foto3" value="#{go.pDTO.foto3}" />
						<p:message for="foto3" />

						<h:outputLabel for="foto4">Foto4</h:outputLabel>
						<h:inputText id="foto4" value="#{go.pDTO.foto4}" />
						<p:message for="foto4" />

						<h:outputLabel for="foto5">Foto5</h:outputLabel>
						<h:inputText id="foto5" value="#{go.pDTO.foto5}" />
						<p:message for="foto5" />

						<h:outputLabel for="foto6">Foto6</h:outputLabel>
						<h:inputText id="foto6" value="#{go.pDTO.foto6}" />
						<p:message for="foto6" />

						<h:commandButton value="Salva" action="#{go.salva()}"
						rendered="true" />
					</h:panelGrid>

					
				</h:form>
			</div>
		</div>
	</div>
	<!--/boxbig-->
</h:body>
</html>
